const { http } = uni.$u;

// 公共
// 上传文件
export const resources_public = (filePath, config = {}) => {
	// let data = formatParams(params);
	return http.upload('/v1/resources/public', {
		filePath:filePath,
		name:'file'
	})
}
// 获取配置数据
export const common_get_config = (params, config = {}) => {
  return http.get("/common/get_config", {params,...config});
};

// 创建个人简历
export const resume_save = (params, config = {}) => {
  return http.post("/v1/resume/save", params, config);
};
// 修改个人简历
export const resume_sid = (sid,params,config = {}) => {
  return http.put(`/v1/resume/${sid}`, params, config);
};
// 创建个人信息
export const candidate_save = (params, config = {}) => {
  return http.post("/v1/candidate/save", params, config);
};
// 修改个人信息
export const candidate_sid_edit = (sid,params,config = {}) => {
  return http.put(`/v1/candidate/${sid}/update`, params, config);
};
// 根据个人信息sid获取简历详细信息
export const resume_sid_me = (sid,params, config = {}) => {
  return http.get(`/v1/resume/${sid}/me`, {params,...config});
};
// 根据sid获取个人信息详情(不计算操作次数)
export const candidate_sid_candidate_detail = (sid,params, config = {}) => {
  return http.get(`/v1/candidate/${sid}/candidate-detail`, {params,...config});
};
// 创建个人简历教育经历
export const school = (params, config = {}) => {
  return http.post("/v1/school", params, config);
};
// 获取简历教育经历的详细信息
export const school_sid = (sid,params, config = {}) => {
  return http.get(`/v1/school/${sid}`, {params,...config});
};
// 修改个人简历教育经历
export const school_sid_edit = (sid,params,config = {}) => {
  return http.put(`/v1/school/${sid}`, params, config);
};
// 根据个人信息sid获取所有教育经历
export const school_sid_all = (sid,params, config = {}) => {
  return http.get(`/v1/school/${sid}/all`, {params,...config});
};
// 删除简历教育经历
export const school_sid_delete = (sid,params,config = {}) => {
  return http.put(`/v1/school/${sid}/delete`, params, config);
}
// 分页获取国家信息信息
export const countries = (params, config = {}) => {
  return http.get(`/v1/countries`, {params,...config});
};
// 根据字典key获取成员信息
export const dicts_by_key = (key,params, config = {}) => {
  return http.get(`/v1/dicts/by-key/${key}`, {params,...config});
};
// 创建个人简历求职期望
export const expectations = (params, config = {}) => {
  return http.post("/v1/expectations", params, config);
};
// 获取简历求职期望的详细信息
export const expectations_sid = (sid,params, config = {}) => {
  return http.get(`/v1/expectations/${sid}`, {params,...config});
};
// 修改个人简历求职期望
export const expectations_sid_edit = (sid,params,config = {}) => {
  return http.put(`/v1/expectations/${sid}`, params, config);
}
// 删除简历求职期望
export const expectations_sid_delete = (sid,params,config = {}) => {
  return http.put(`/v1/expectations/${sid}/delete`, params, config);
}
// 创建个人简历工作经历
export const work = (params, config = {}) => {
  return http.post("/v1/work", params, config);
};
// 获取简历工作经历的详细信息
export const work_sid = (sid,params, config = {}) => {
  return http.get(`/v1/work/${sid}`, {params,...config});
}
// 修改个人简历工作经历
export const work_sid_edit = (sid,params,config = {}) => {
  return http.put(`/v1/work/${sid}`, params, config);
}
// 删除简历工作经历
export const work_sid_delete = (sid,params,config = {}) => {
  return http.put(`/v1/work/${sid}/delete`, params, config);
}
// 根据个人信息sid获取所有工作经历
export const work_sid_all = (sid,params, config = {}) => {
  return http.get(`/v1/work/${sid}/all`, {params,...config});
}
// 创建个人简历项目经历
export const project = (params, config = {}) => {
  return http.post("/v1/work", params, config);
};
// 获取简历项目经历的详细信息
export const project_sid = (sid,params, config = {}) => {
  return http.get(`/v1/project/${sid}`, {params,...config});
}
// 修改个人简历项目经历
export const project_sid_edit = (sid,params,config = {}) => {
  return http.put(`/v1/project/${sid}`, params, config);
}
// 删除简历工作经历
export const project_sid_delete = (sid,params,config = {}) => {
  return http.put(`/v1/project/${sid}/delete`, params, config);
}
// 删除简历项目经历
export const project_sid_all = (sid,params, config = {}) => {
  return http.get(`/v1/project/${sid}/all`, {params,...config});
}
// 创建标签
export const create_tag = (params, config = {}) => {
  return http.post("/v1/tag/create-tag", params, config);
};
// 删除标签
export const tag_sid_delete = (sid,params,config = {}) => {
  return http.put(`/v1/tag/${sid}/delete`, params, config);
}